<?php if(!defined('SABLOG_ROOT')) exit('Access Denied');?>
<div id="submenu">
	<ul>
		<li><a href="cp.php?job=link" <!--{if !$view}-->class="focus"<!--{/if}-->><span>查看全部链接</span></a></li>
		<li><a href="cp.php?job=link&action=list&view=display" <!--{if $view == 'display'}-->class="focus"<!--{/if}-->><span>查看已显示链接</span></a></li>
		<li><a href="cp.php?job=link&action=list&view=hidden" <!--{if $view == 'hidden'}-->class="focus"<!--{/if}-->><span>查看已隐藏链接</span></a></li>
	</ul>
</div>

<div id="wrap">
	<form action="cp.php?job=link" method="POST" name="form">
		<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
			<tr class="tdbheader">
				<td width="5%" nowrap>排序</td>
				<td width="5%">显示</td>
				<td width="23%">名称</td>
				<td width="30%">地址</td>
				<td width="30%">描述</td>
				<td width="5%" nowrap><input name="chkall" value="on" type="checkbox" onclick="checkall(this.form)" /></td>
			</tr>
			<!--{loop $linkdb $link}-->
			<!--{eval $thisbg = isset($thisbg) && $thisbg == 'tablecell' ? 'tablecell2' : 'tablecell';}-->
			<tr class="$thisbg" onmouseover="this.className='cellfocus';" onmouseout="this.className='$thisbg';">
				<td><input class="formfield" style="text-align:center;font-size:11px;" type="text" value="$link[displayorder]" name="displayorder[{$link[linkid]}]" size="1" /></td>
				<td><input type="checkbox" name="visible[{$link[linkid]}]" value="1" $link[visible_check] /></td>
				<td><input class="formfield" name="name[{$link[linkid]}]" type="text" value="$link[name]" size="20" /></td>
				<td><input class="formfield" name="url[{$link[linkid]}]" type="text" value="$link[url]" size="30" /></td>
				<td><input class="formfield" name="note[{$link[linkid]}]" type="text" value="$link[note]" size="30" /></td>
				<td nowrap><input type="checkbox" name="delete[]" value="$link[linkid]" /></td>
			</tr>
			<!--{/loop}-->
			<!--{eval $thisbg = isset($thisbg) && $thisbg == 'tablecell' ? 'tablecell2' : 'tablecell';}-->
			<tr class="$thisbg" onmouseover="this.className='cellfocus';" onmouseout="this.className='$thisbg';">
				<td><input class="formfield" style="text-align:center;font-size:11px;" type="text" value="" name="new_displayorder" size="1" /></td>
				<td><input type="checkbox" name="new_visible" value="1" checked /></td>
				<td><input class="formfield" name="new_name" type="text" value="" size="20" /></td>
				<td><input class="formfield" name="new_url" type="text" value="" size="30" /></td>
				<td><input class="formfield" name="new_note" type="text" value="" size="30" /></td>
				<td nowrap>新增</td>
			</tr>
			<tr class="tablecell">
				<td colspan="6" align="center"><div class="records">记录:$total</div>
				<div class="multipage">$multipage</div></td>
			</tr>
		</table>

		<div class="submit">
			<input type="hidden" name="action" value="domorelink" />
			<button type="submit">更新 / 删除(所选)</button>
		</div>
	</form>